import Vue from 'vue'
import App from './App.vue'
import i18n from './i18n'
import store from './store'
import router from './router'
import '@/vab'
import '@/assets/sys/style/common.scss'
import '@/assets/com/style/common.scss'
import '@/assets/com/font-icon/iconfont.css'
import Utils from '@/utils/utils'
import Directive from '@/utils/directive'
import filter from "@/utils/filter";
import LoadingDirective from "@/components-sys/loading-directive/loading-directive"

// 注册全局过滤器
Object.keys(filter).forEach(key => {
	Vue.filter(key, filter[key]);
});

// 导入公共方法
Vue.prototype.$returnDict = Utils.returnDict
Vue.prototype.$bus = new Vue();
Vue.prototype.$utils = Utils;
Vue.prototype.$baseLoading = LoadingDirective.loading;
// 自定义指令权限
// 权限控制
Vue.use(Directive.auth);
// 自定义指令loading
Vue.use(LoadingDirective.Directive);
Vue.config.productionTip = false
window['vm'] = new Vue({
	el: '#app',
	i18n,
	store,
	router,
	render: (h) => h(App)
})
